/*
 * Sensors.cpp
 *
 * This class provides an abstraction layer for reading data from the sensors
 *
 */

#include "Sensors.h"
#include "../Util/Conf.h"
#include "../Util/ConfigFile.h"

namespace Group5 {

void Sensors::Init()
{
  ConfigFile cf = Conf::get();
  ir_front(cf.read<int>("FrontIR_channel"), cf.read<int>("FrontIR_slope"), cf.read<int>("FrontIR_bias") );
  ir_back(cf.read<int>("BackIR_channel"), cf.read<int>("BackIR_slope"), cf.read<int>("BackIR_bias") );

  ir_right_front(cf.read<int>("RightFrontIR_channel"), cf.read<int>("RightFrontIR_slope"), cf.read<int>("RightFrontIR_bias") );
  ir_right_back(cf.read<int>("RightBackIR_channel"), cf.read<int>("RightBackIR_slope"), cf.read<int>("RightBackIR_bias") );

  ir_left_front(cf.read<int>("LeftFrontIR_channel"), cf.read<int>("LeftFrontIR_slope"), cf.read<int>("LeftFrontIR_bias") );
  ir_left_back(cf.read<int>("LeftBackIR_channel"), cf.read<int>("LeftBackIR_slope"), cf.read<int>("LeftBackIR_bias") );

};

}
